// === DEFAULT / CUSTOM STYLE ===
// WARNING! always comment out ONE of the two require() calls below.
// 1. use next line to activate CUSTOM STYLE (./src/themes)
// require(`./themes/app.${__THEME}.styl`)
// 2. or, use next line to activate DEFAULT QUASAR STYLE
require(`quasar/dist/quasar.${__THEME}.css`)
// ==============================

// Uncomment the following lines if you need IE11/Edge support
// require(`quasar/dist/quasar.ie`)
// require(`quasar/dist/quasar.ie.${__THEME}.css`)

import Vue from 'vue'
import router from './router'

import Quasar,{
  dom,
  event,
  openURL,
  QLayout,
  QToolbar,
  QToolbarTitle,
  QBtn,
  QIcon,
  QList,
  QListHeader,
  QItem,
  QItemSide,
  QItemMain,
  QSideLink,
  QFixedPosition,
  QInput,
  QScrollArea,
  QScrollObservable

} from 'quasar'

Vue.config.productionTip = false

Vue.use(Quasar, {
  components: {
    dom,
    event,
    openURL,
    QLayout,
    QToolbar,
    QToolbarTitle,
    QBtn,
    QIcon,
    QList,
    QListHeader,
    QItem,
    QItemSide,
    QItemMain,
    QSideLink,
    QFixedPosition,
    QInput,
    QScrollArea,
    QScrollObservable
  }
})

// ==============================
import Highlight from 'highlight.js'
import 'highlight.js/styles/github.css' //样式文件
Vue.directive('highlight',function (el) {
  let blocks=el.querySelectorAll('pre');
  if(blocks!=null){
    blocks.forEach(function (v) {
      Highlight.highlightBlock(v);
    })
  }
})
// ==============================

import $http from './http'
import config from 'config'
import toast from './plugins/toast'
import store from './plugins/store'

Vue.prototype.config=config;
Vue.use($http)
if (__THEME === 'mat') {
  require('quasar-extras/roboto-font')
}
import 'quasar-extras/material-icons'
// import 'quasar-extras/ionicons'
// import 'quasar-extras/fontawesome'
// import 'quasar-extras/animate'

Quasar.start(() => {
  /* eslint-disable no-new */
  new Vue({
    el: '#q-app',
    router,
    render: h => h(require('./App'))
  })
})
